//
//  MessageDao.h
//  SouthChina
//
//  Created by creator_lq on 14/12/4.
//  Copyright (c) 2014年 科创. All rights reserved.
//

#import "DateBaseHelper.h"
#import "Message.h"

@interface MessageDao : DateBaseHelper


+(BOOL)insertMessage2DB:(Message*)message;

+(NSArray*)queryMessageBySessionId:(NSString *) sessinId;

+(Message*)queryMsgByID:(NSString *) msgId;

//是否存在该条message
+(BOOL) isExistMessageById:(NSString *) msgId;

+(BOOL)deleteMessageById:(NSString*)msgid;
+(BOOL)deleteMessageBysessionId:(NSString*)msgsessionid;

+(BOOL)updataMessageAddOtherInfo:(Message*) message addInfo:(NSDictionary*) info time:(NSDate*)time;

+(int)queryMsgCountBySeesion:(NSString*)sessionId;

+(BOOL)deleteMessageAll;

@end
